Function: aw-window<

aw-window< is a byte-compiled function defined in ace-window.el.

Signature

(aw-window< WND1 WND2)

Documentation

Return true if WND1 is less than WND2.

This is determined by their respective window coordinates. Windows are numbered top down, left to right.

Source Code

;; Defined in ~/.emacs.d/elpa/ace-window-20220911.358/ace-window.el
(defun aw-window< (wnd1 wnd2)
  "Return true if WND1 is less than WND2.
This is determined by their respective window coordinates.
Windows are numbered top down, left to right."
  (let* ((f1 (window-frame wnd1))
         (f2 (window-frame wnd2))
         (e1 (window-edges wnd1))
         (e2 (window-edges wnd2))
         (p1 (frame-position f1))
         (p2 (frame-position f2))
         (nl (or (null (car p1)) (null (car p2)))))
    (cond ((and (not nl) (< (car p1) (car p2)))
           (not aw-reverse-frame-list))
          ((and (not nl) (> (car p1) (car p2)))
           aw-reverse-frame-list)
          ((< (car e1) (car e2))
           t)
          ((> (car e1) (car e2))
           nil)
          ((< (cadr e1) (cadr e2))
           t))))